<!DOCTYPE html>
<html class="ui-page-login">

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>店铺-周趋势分析</title>
		<link href="css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="css/mui.picker.min.css">
		<link href="css/style.css" rel="stylesheet" />
		<link href="css/reg_style.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="css/ljq.css" />
		<link rel="stylesheet" type="text/css" href="css/ljq-post.css" />
		<style>
			.div4:last-child {
				border-bottom: 5px solid #eee!important;
			}
			.head1 em {
			    float: left;
			    width: 0.23rem;
			    height: 0.44rem;
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav head1">
			<em class="mui-action-back"><img class="img1" src="img/fanhui.png" alt="" /></em>
			<div class="div1"><span class="span0" id="list-shop-lists" onclick="user_select_shop();">周趋势分析</span></div>
			<img class="img2" src="img/problem.png" alt="" onclick="time_img(zhouqushi);"/>
			<!---->

			<!---->
		</header>
		<div class="mui-content">
			<div class="zong">
				<div class="div4 clearfix">
					<span class="span4">分析指标<em style="color: #ccc;">（最多两个）</em></span>
					<em onclick='xtype();' id='index-type' class="em4">营业额</em>
				</div>
				<div class="div4 clearfix">
					<span class="span4">选择时间</span>
					<em onclick="xweek();" id='index-week' class="em4">星期一</em>
				</div>
			</div>

			<!--<div class="tu_graphic clearfix">
				<div id='index-graphic-data1-name' class="title1"></div>
				<div id="statistics_turnover1" class="main_graphic"></div>
			</div>-->
			
			<div id="mychart" class="chart" style="width: 100%; height: 2.5rem; border: 0px solid #333;margin-top: 0.2rem;"></div>			

		</div>

		<!--/********************日期控件**************************/-->
		<!--<link rel="stylesheet" type="text/css" href="css/hgs-date.css" />
		<script src="js/hgs-date.js"></script>-->
		<!--/********************日期控件**************************/-->
		<input id="index-shop-lists-id" type="hidden">
		<input id="index-shop-lists" type="hidden">
		<input id='index-end-date' type="hidden" />
		<input id='index-start-date' type="hidden" />

		<!--/***************************************************/-->

		<script src="js/mui.min.js"></script>
		<script src="js/mui.enterfocus.js"></script>
		<script src="js/app.js"></script>
		<script src="js/mui.picker.min.js"></script>
		<!--<script type="text/javascript" src="js/jsencrypt.min.js"></script>
		<script src="js/md5.js"></script>-->
		<script src="js/crypto-js.js"></script>
		<script src="js/jquery.js"></script>
		<script type="text/javascript" src="js/common.js?ver=20180122"></script>
		<script type="text/javascript" src="js/fuction.js?ver=20180122"></script>
		<script src="js/echarts.js"></script>
		<script src="js/ljq-post.js"></script>
		<script src="js/chart-zx-and-zx-0.js?ver=20180122"></script>		<!--//折线与折线并且 有渐变效果	-->
		<script src="js/chart-zx-only-bj.js?ver=20180122"></script>		<!--//只有一根折线并且 有渐变效果	-->
		<script src="js/ljq_biaoqiao.js"></script>		<!--//标签	-->	
		<script type="text/javascript">
			mui.init();
		</script>

		<script>
			
			
			var xweek_picker = new mui.PopPicker();
			//picker初始化内容 
			var xweek_position_json = [{
					value: 0,
					text: '星期日'
				}, {
					value: 1,
					text: '星期一'
				}, {
					value: 2,
					text: '星期二'
				}, {
					value: 3,
					text: '星期三'
				}, {
					value: 4,
					text: '星期四'
				}, {
					value: 5,
					text: '星期五'
				}, {
					value: 6,
					text: '星期六'
				}];

			var xtype_position_json = ['营业额', '客流量', '客单价', '成交率', '成交笔数', '连带率', '销售件数'];

			mui.ready(function() {
				//获取当前的客户数据
				xminereadyload();

//				//获取当天的日期	
//				var xtoday = GetDateStr(0);
//				mui("#index-start-date")[0].value = xtoday;
//				mui("#index-end-date")[0].value = xtoday;

				//这是初始化时间维度
				xweek_picker.setData(xweek_position_json);

				//获取首页信息-数据
				statistics_weektrend();
			});
			
			
			//获取店铺信息-获取周趋势分析
			function xweek() {
				xweek_picker.show(function(SelectedItem) {
					mui("#index-week")[0].innerHTML = SelectedItem[0].text;
					//获取首页信息-数据
					statistics_weektrend();
				})
			}	
			



			//获取店铺信息-获取周趋势分析
			function statistics_weektrend() {
				var xbx = {}; //登录后的参数对象AES加密
				xbx.shop_id = user_info.look_shop_id; //是 店铺ID
				tmptype = mui("#index-type")[0].innerHTML; //营业额、客流量、客单价、成交率和连带率
				xbx.type = tmptype.split(",");
				xbx.week = mui("#index-week")[0].innerHTML; //0:星期天，1：星期一

				official_login_after(url_host + 'statistics/weektrend', xbx, 'statistics_weektrend');
			}

			/********************多项选择的控件**************************/
			//打开类别的弹窗
			function xtype(){
				$(".dibutanchu").show();
			}
			
			//确定选择类别
			function btn_type_submit() {			
				judge_type_input();
								
				mui("#index-type")[0].innerHTML=mui("#box-ljq-tab")[0].innerHTML;
				//获取首页信息-订单数据流水
				statistics_weektrend();
			}
			/********************日期控件**************************/
		</script>
	</body>

</html>